package com.learn.algorithm.designpattern.singleton;

/**
 * 单线程下的懒汉式单例模式
 *
 * @author wangxing
 * @version 2020/5/7 13:52 Administrator
 */
public  class LazySinglet {
    private LazySinglet instance;

    private LazySinglet() {
    }
    public LazySinglet getInstance() {
        if (this.instance == null) {
            this.instance = new LazySinglet();
        }
        return this.instance;
    }
}
